<html>
<head>
<title>Test</title>
<script type="text/javascript" >
var divVar;
function init(){
	divVar = document.getElementById('myDiv');
	signIn();
}
</script>
</head>
<body onload="init()">
<script type="text/javascript">
function userSignIn()
{
	document.write("<p> hello Yoni</p>");
	document.getElementById("mydiv").innerHTML="<p> it works</p>";
	window.alert("i'm in SignIn");
}
</script>
<input onclick="userSignIn()" type="button" value="sign in"></input>
<div id="myDiv" style="visibility: visible"><p> hello</p></div>
</body>
</html>